package cn.xyafu.lost.utils;

import android.content.Context;
import android.widget.Toast;

/**
* @author wangdh
* @time 2021/12/7 0007
* desc： 解决多次点击,出现多个Toast的问题
*/
public class ToastUtils {

    private static Toast toast;
	
    public static void showToast(Context context, String content){

        if (toast == null){
            toast = Toast.makeText(context, content, Toast.LENGTH_SHORT);
        } else {
            toast.setText(content);
        }
        toast.show();
    }

}